#ifndef _AC_Calypso_SIMULATIONTHREAD
#define _AC_Calypso_SIMULATIONTHREAD

namespace AirCrash {
namespace Calypso {

class SimulationThread : public QThread {
	Q_OBJECT

	volatile bool mInterrupted;
	QWaitCondition mWait;
	QMutex mMutex;
	QString mCode;

	void insertPage();
	void tombolaPage();

	SimulationThread(const SimulationThread&);

public:
	SimulationThread();
	~SimulationThread();

	void run();
	void interrupt();

public slots:
	void nextItem();

signals:
	void changePage(int page);
	void enterCode(const QString& code);
	void getCode();
	void fillInsertPage(int friday, int saturday, int sunday, QString summary, bool jackpot);
	void generateCodes();
	void createItem();

};

}
}

#endif